home *** CD-ROM | disk | FTP | other *** search
/ PC World 2006 July & August / PCWorld_2006-07-08_cd.bin / komunikace / apache / apache_2[1].2.2-win32-x86-no_ssl.msi / Data1.cab / F48458_printenv.pl < prev    next >
Perl Script  |  2006-04-29  |  308b  |  14 lines

  1. #!d:/Perl/bin/perl.exe
  2. ##
  3. ##  printenv -- demo CGI program which just prints its environment
  4. ##
  5.  
  6. print "Content-type: text/plain; charset=iso-8859-1\n\n";
  7. foreach $var (sort(keys(%ENV))) {
  8.     $val = $ENV{$var};
  9.     $val =~ s|\n|\\n|g;
  10.     $val =~ s|"|\\"|g;
  11.     print "${var}=\"${val}\"\n";
  12. }
  13.  
  14.